<?php

/**
 * OntoWiki similarinstances module template
 */

?>
<?php if (!empty($this->similars)): ?>
	<ul id="similarinstances">
	    <?php foreach ($this->similars as $type => $instances): ?>
            <?php $class = $this->types[$type] ?>
	        <li class="si_class">
                    <h4><!-- a class="hasMenu"
                           about="<?php echo $class['uri'] ?>"
                           href="<?php echo $class['url'] ?>" --><?php echo $class['title'] ?><!-- /a --></h4>
	            <ul class="si_instances">
	                <?php $i = 0; ?>
	                <?php foreach ($instances as $instance): ?>
	                    <?php if ((++$i == count($instances)) && ($class['has_more'] == false) ): ?>
	                        <li class="last-child"><a class="hasMenu" about="<?php echo $instance['uri'] ?>" href="<?php echo $instance['url'] ?>"><?php echo $instance['title'] ?></a></li>
	                    <?php else: ?>
	                        <li><a class="hasMenu" about="<?php echo $instance['uri'] ?>" href="<?php echo $instance['url'] ?>"><?php echo $instance['title'] ?></a></li>
	                    <?php endif; ?>
                    <?php endforeach; ?>
	            </ul>
	        </li>
	    <?php endforeach; ?>
	</ul>
<?php endif; ?>
